package com.shujia.reflect;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.ArrayList;

public class Demo3Data {

    public static void main(String[] args) {


        ArrayList<Student> students = DataRead.read("java/data/students.txt", Student.class);

        for (Student student : students) {
            System.out.println(student);
        }

        ArrayList<Score> scores = DataRead.read("java/data/score.txt", Score.class);

        for (Score score : scores) {
            System.out.println(score);
        }


        ArrayList<Cource> cources = DataRead.read("java/data/cource.txt", Cource.class);

        for (Cource cource : cources) {
            System.out.println(cource);
        }



    }



}
